AutoMate provides a variety of ways to automatically handle task generated errors. These task generated errors can range from files or windows not being found at runtime and other more subtle, unexpected conditions that could normally cause a task to fail completely.
Every action in the available actions library contains two special tabs called "Error Causes" and "On Error".
The "Error Causes" tab allows the task developer to determine what conditions AutoMate should consider an error for each step. During task execution, if one of these conditions are met, the specified actions in the On Error Tab are carried out.
Any Error: Any problem encountered during this steps execution will cause the instructions specified in the On Error tab to be carried out.
Only Certain Errors: A list of errors that the step can generate is displayed, only the selected errors will cause the instructions specified in the On Error tab to be carried out, any other errors are ignored.
If this step takes more than this many milliseconds to complete: When checked, this parameter acts as a timeout value for the step. For example, if an Execute SQL Query step is being executed and this value is set to 5000 - if the query took longer than 5 seconds then the step would error and the instructions in the On Error tab would be carried out.
The "On Error" tab allows the task developer to determine what AutoMate should do if a particular step encounters a problem as defined in the "Error Causes" tab.
Retry the step X times then: This allows the task developer to specify that the step should be retried X number of times before actually considering it a true step failure. When enabled, the step will attempt to retry execution by number of times specified, if after these retries, the step still fails, the remainder of the actions below will be carried out.
Start Task
Enabled: Specifies that
another task should be executed if this step generates an error -
this is normally used to execute steps to rectify the error.
Task: Specifies the path and file name of the task (.aml file) that
should be executed.
Break Loop
Enabled: Specifies that, if
the step is inside a loop, the task should stop looping if an error occurs.
Set Variable
Enabled: Specifies that an
already existing AutoMate variable should
be populated with a user defined value if the step generates an error.
Variable Name - specifies
the name of a variable. The variable must have been previously
created with the Create
Variable action.
Variable Value: Specifies
the value to place into the variable.
Write to Log
Enabled
Log Text
Send Email
Enabled: Specifies that an
SMTP message should be sent if this step generates an error. The
message will be populated with information about the specific error
that occurred and other task information.
Recipient: Specifies the
recipient of the email message.
From: Specifies the email
address that should be used in the from header of the message. Many
SMTP mailservers require a valid from address.
Goto Line
Enabled:
Specifies that AutoMate should skip to another line in the task if an
error occurs.
Line:
Specifies the line number to go to if an error is generated by this step.
TIP: Use Start Task instead of
Goto... too many "goto" instructions can produce extremely unmanageable
tasks.
Stop Task: The task should stop if an error occurs (as defined in Error Causes) during execution of this step.
Continue Task: The task should continue if an error occurs (as defined in Error Causes) during execution of this step. This option if useful of one of the following conditions is true:
The error is non-critical.
Additional error handling steps is located below this step.